home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
nivb
/
wse.frm
< prev
Wrap
Text File
|
1995-05-07
|
6KB
|
194 lines
VERSION 2.00
Begin Form WSEForm
Caption = "Workstation Environment Services Test"
ClientHeight = 3615
ClientLeft = 1695
ClientTop = 1545
ClientWidth = 5370
Height = 4020
Left = 1635
LinkTopic = "Form1"
ScaleHeight = 3615
ScaleWidth = 5370
Top = 1200
Width = 5490
Begin CommandButton DoneButton
Caption = "&OK"
Height = 372
Left = 2280
TabIndex = 0
Top = 3120
Width = 852
End
Begin Label ShortHwTypeLabel
Height = 252
Left = 2520
TabIndex = 15
Top = 2400
Width = 1812
End
Begin Label HwTypeLabel
Height = 252
Left = 2520
TabIndex = 14
Top = 2160
Width = 1812
End
Begin Label osVerLabel
Height = 252
Left = 2520
TabIndex = 13
Top = 1920
Width = 1812
End
Begin Label LocalDriveLabel
Height = 252
Left = 2520
TabIndex = 12
Top = 2760
Width = 972
End
Begin Label OSTypeLabel
Height = 252
Left = 2520
TabIndex = 11
Top = 1680
Width = 1812
End
Begin Label ShellVerLabel
Height = 252
Left = 2520
TabIndex = 10
Top = 1200
Width = 972
End
Begin Label PrimaryLabel
Height = 252
Left = 2520
TabIndex = 9
Top = 720
Width = 2532
End
Begin Label PreferredLabel
Height = 252
Left = 2520
TabIndex = 8
Top = 480
Width = 2532
End
Begin Label DefaultLabel
Height = 252
Left = 2520
TabIndex = 7
Top = 240
Width = 2532
End
Begin Label Label6
Alignment = 1 'Right Justify
Caption = "Workstation Environment description strings:"
Height = 372
Left = 240
TabIndex = 6
Top = 1560
Width = 2172
End
Begin Label Label5
Alignment = 1 'Right Justify
Caption = "NetWare Shell version:"
Height = 255
Left = 240
TabIndex = 5
Top = 1200
Width = 2175
End
Begin Label Label4
Alignment = 1 'Right Justify
Caption = "Number of Local Drives:"
Height = 255
Left = 240
TabIndex = 4
Top = 2760
Width = 2175
End
Begin Label Label3
Alignment = 1 'Right Justify
Caption = "Primary connection ID:"
Height = 255
Left = 360
TabIndex = 3
Top = 720
Width = 2055
End
Begin Label Label2
Alignment = 1 'Right Justify
Caption = "Preferred connection ID:"
Height = 255
Left = 240
TabIndex = 2
Top = 480
Width = 2175
End
Begin Label Label1
Alignment = 1 'Right Justify
Caption = "Default connection ID:"
Height = 255
Left = 240
TabIndex = 1
Top = 240
Width = 2175
End
End
Sub DoneButton_Click ()
Unload WSEForm
End Sub
Sub Form_Load ()
Dim osType As String * 10
Dim osVer As String * 10
Dim hwType As String * 10
Dim shortHwType As String * 10
fileServerName$ = String$(48, 0)
fileServerName$ = GetDefaultFileServerName()
fileServerName$ = Left$(fileServerName$, InStr(fileServerName$, Chr$(0)) - 1)
DefaultLabel.Caption = Format$(defaultConnID%) + " (" + fileServerName$ + ")"
fileServerName$ = String$(48, 0)
preferredConnID% = GetPreferredConnectionID()
If (preferredConnID% <> 0) Then
GetFileServerName preferredConnID%, fileServerName$
fileServerName$ = Left$(fileServerName$, InStr(fileServerName$, Chr$(0)) - 1)
PreferredLabel.Caption = Format$(preferredConnID%) + " (" + fileServerName$ + ")"
Else
PreferredLabel.Caption = "Not set"
End If
fileServerName$ = String$(48, 0)
primaryConnID% = GetPrimaryConnectionID()
If (primaryConnID% <> 0) Then
GetFileServerName primaryConnID%, fileServerName$
fileServerName$ = Left$(fileServerName$, InStr(fileServerName$, Chr$(0)) - 1)
PrimaryLabel.Caption = Format$(primaryConnID%) + " (" + fileServerName$ + ")"
Else
PrimaryLabel.Caption = "Not set"
End If
ccode% = GetNetWareShellVersion(majorVersion%, minorVersion%, revLevel%)
If (ccode% = 255) Then
ShellVerLabel.Caption = Format$(majorVersion%) + "." + Format$(minorVersion%) + Chr$(revLevel% + 97)
Else
ShellVerLabel.Caption = "Ancient"
End If
numDrives% = GetNumberOfLocalDrives()
LocalDriveLabel.Caption = Format$(numDrives%)
GetWorkstationEnvironment ByVal osType, ByVal osVer, ByVal hwType, ByVal shortHwType
OsTypeLabel.Caption = osType
OsVerLabel.Caption = osVer
HwTypeLabel.Caption = hwType
ShortHwTypeLabel = shortHwType
End Sub